package fileDemo;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

public class Demo14 {
    public static void main(String[] args) throws FileNotFoundException {
        try(Reader reader=new FileReader("D:/Project/java/java-biog/" +
                "Day20250312/IO测试文件目录/测试1.txt")){
            while(true){
                char[] chars=new char[1024];
                int ch=reader.read(chars);
                if(ch==-1) break;
                for (int i = 0; i < ch; i++) {
                    System.out.println(chars[i]);
                }
            }

        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
